package edu.hubu;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class main {

    public static void jiami(){
        List<Integer> data = new ArrayList<>();
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 6; i++) {
            data.add(scanner.nextInt());
        }

        // data.forEach(i -> i = (i*5)%10);
        data.stream().map(i -> (i*5)%10 ).collect(Collectors.toList());

        data.forEach(i -> System.out.println(i));
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        // String i = scanner.next();
        // System.out.println(i);

        jiami();



    }
}
